package kt_test.room.entity

import androidx.room.*

@Entity(
    tableName = "oxygen_sample",
    foreignKeys = [ForeignKey(
        entity = UserInfoEntity::class,
        parentColumns = ["userId"],
        childColumns = ["userId"],
        onDelete = ForeignKey.CASCADE
    )],
    indices = [Index(value = ["userId"])]
)
data class OxygenSampleEntity(
    @PrimaryKey(autoGenerate = true) val id: Int = 0,
    val userId: String,
    val time: String,
    val spo2: Double
)
